<?php
defined('BASEPATH') OR exit('No direct script access allowed');
?><!DOCTYPE html><html lang="en">
	<head>
		<!--加载header文件-->
		<?php
		include_once 'public/views/header.php';
		include_once 'public/home/html/laydate.php';
		include_once 'public/home/html/alert.php';
		?>
		<link rel="stylesheet" href="public/css/list.css" />
		<link rel="stylesheet" href="public/xr/xrDatatable.css" />
		<script src="public/xr/xrDatatable.js"></script>
		<script src="public/js/list.js"></script>
		<script src="cust/js/attendList.js?v=20211013"></script>
		<script src="public/home/js/function.js"></script>
	</head>
	<style>
		input,select {
			margin-bottom: 10px;
		}
	</style>
	<body>
		<input type="hidden" id="zjipc_auth_url" value="<?php echo ZJIPC_AUTH_URL ?>">
		<input type="hidden" id="zjipc_app_id" value="<?php echo ZJIPC_APP_ID ?>">
		<div class="page-container container">
			<div class="searchForm">
			    <div class="searchForm-title"><i class="icon-table searchForm-title-icon"></i>数据表格<i class="icon-double-angle-up searchFormTitleIcon"></i></div>
			    <div class="searchForm-main">
					<form id="searchForm">
                        <input type="text" name='class_name' id="param" placeholder="课程名称"/>
                        <input type="text" name='listen_class' placeholder="听课班级">
                        <input type="text" name='teacher_name' placeholder="授课教师">
                        <input type="text" name='listen_name' placeholder="听课督导" value="<?php if(isset($teacher_name))echo $teacher_name?>">
                        <input type="text" name='content' placeholder="听课记录">
                        <input type="text" name='start_time' id="start_time" placeholder="请选择起始时间"/>
						<input type="text" name='end_time' id="end_time" placeholder="请选择终止时间"/>     
                        <select name="title" id="title">
                            <option value="-1">全部职称</option>
                            <?php foreach ((new Title())->getAll() as $k => $v): ?>
                                <option value="<?php echo $v[XPHEnum::Caption]; ?>"><?php echo $v[XPHEnum::Caption]; ?></option>
                            <?php endforeach; ?>
                        </select>
                        <select name="class_type" id="class_name">
                            <option value="-1">全部课程类型</option>
                            <?php foreach ((new CourseName())->getAll() as $k => $v): ?>
                                <option value="<?php echo $v[XPHEnum::Caption]; ?>"><?php echo $v[XPHEnum::Caption]; ?></option>
                            <?php endforeach; ?>
                        </select>
                        <select name="type" id="type">
                            <option value="-1">听课督导类型</option>
                            <?php foreach ((new AttendType())->getAll() as $k => $v): ?>
                                <option value="<?php echo $v[XPHEnum::Value]; ?>"><?php echo $v[XPHEnum::Caption]; ?></option>
                            <?php endforeach; ?>
                        </select>
                        <select name="dept_name" id="dept_name" >
			               <option value="-1">分院名称</option>
			               <?php foreach ($dept_name as $k => $v):?>
			                <option value="<?=$v['dept_name']?>"><?=$v['dept_name']?></option>
			               <?php endforeach ?>
			             </select>
			              <select name="listen_type" id="listen_type">
                            <option value="-1">听课类型</option>
                            <?php foreach ($listen_type as $k => $v): ?>
                                <option value="<?php echo $v['option']; ?>"><?php echo $v['option']; ?></option>
                            <?php endforeach; ?>
                        </select>
					</form>

				</div>
			</div>
			<div class="operationRow">
	<button class="pageItemButton" onclick="showDialogModal('<?=base_url()?>Admin/Class_Assess/attendAdd/0');"><i class="icon-edit"></i>添加</button>
 				<button class="pageItemButton" onclick="Export()"><i class="icon-edit"></i>导出</button>
			</div>
			        
			<div class="listcontent">
				<div class='xrTableRow'>
					<table id="table" class="xrTable">
						<thead>
							<tr>
								<th name="_xrno"></th>
								<th name="_oper" style="width: 120px;">操作</th>
                                <!-- <th name="_serial_no" > 编号 </th> -->                                
                                <th name="_listen_name" > 听课督导名称 </th>
                                <th name="_teacher_name" > 授课教师名称 </th>
                                <th name="_teaching_level_score" > 教学水平总分 </th>
                                <th name="_teaching_effect_score" > 教学效果总分 </th>
                                <th name="_score" > 总分 </th>
                                <th name="_academic_year" > 学年 </th>
                                <th name="_semester" > 学期 </th>
                                <th name="_type_char" > 听课类型 </th>
                                <th name="_class_name" > 课程名称 </th>
                                <th name="_class_type" > 课程类型 </th>
                                <th name="_title" > 职称 </th>
                                <th name="_dept_name" > 所属二级学院（部） </th>
                                <!-- <th name="_age_groups" > 年龄层次 </th> -->
                                <th name="_teachers_attribute" > 教师属性 </th>
                                <th name="_listen_type" > 听课类型 </th>
                                <th name="_listen_time" > 听课时间 </th>
                                <!-- <th name="_listen_address" > 听课地点 </th> -->
                                <th name="_course_units" > 开课单位 </th>
                                <th name="_status_char" > 状态 </th>
                                <!-- <th name="_listen_class" > 听课班级 </th> -->
							</tr>
						</thead>
					</table>
				</div>
			</div>
		</div>
	</body>
	<script>
		$("body").keydown(function() {
             if (event.keyCode == "13") {//keyCode=13是回车键
                 $('.searchButton').click();
             }
         });
		$('#start_time').change(function(event) {
		if($('#start_time').val()!='' && $('#end_time').val()!=''){
			$('.searchButton').click();
		}
		});
		$('#end_time').change(function(event) {
			if($('#start_time').val()!='' && $('#end_time').val()!=''){
				$('.searchButton').click();
			}
		});
		$("#title").change(function(){
			$('.searchButton').click();
		});
		$("#dept_name").change(function(){
			$('.searchButton').click();
		});
		$("#class_name").change(function(){
			$('.searchButton').click();
		});
		$("#type").change(function(){
			$('.searchButton').click();
		});
		$("#listen_type").change(function(){
			$('.searchButton').click();
		});
	</script>
</html>